<{include file="public/header.html"}> 
	<header class="title title-border-sm bj-white">
            <a href="javascript:;" class="icon-return iconfont title-left title-top col-red" onclick="javascript:history.go(-1);">&#xe604;</a>
		<h1 class="text-center name">第三方登录绑定</h1>
	</header>
	<div class="bind-third">
		<ul class="plr15">
			<li class="border-bottom-sm">
				<font class="iconfont fl iconfont-qq">&#xe632;</font>
                                <button class="<{if $user_info['qq_nickname']}>bj-greyccc<{else}>bj-red<{/if}> fr _bind" data-type="qq" data-val="<{if $user_info['qq_nickname']}>1<{else}>0<{/if}>" data-ref="<{eval url('account/qq_login')}>"><{if $user_info['qq_nickname']}>解绑<{else}>未绑定<{/if}></button>
                                <p>QQ<span class="ml20 col-grey999 font12"><{$user_info['qq_nickname']}></span></p>
			</li>
                        <{if $is_weixin}>
			<li class="border-bottom-sm">
				<font class="iconfont fl iconfont-wechat">&#xe68b;</font>
				<button class="<{if $user_info['wx_nickname']}>bj-greyccc<{else}>bj-red<{/if}> fr _bind" data-type="weixin" data-val="<{if $user_info['wx_nickname']}>1<{else}>0<{/if}>" data-ref="<{eval url('account/weixin_login')}>"><{if $user_info['wx_nickname']}>解绑<{else}>未绑定<{/if}></button>
				<p>微信<span class="ml20 col-grey999 font12"><{$user_info['wx_nickname']}></p>
			</li>
                        <{/if}>
			<li class="border-bottom-sm">
				<font class="iconfont fl iconfont-weibo">&#xe653;</font>
				<button class="<{if $user_info['wb_nickname']}>bj-greyccc<{else}>bj-red<{/if}> fr _bind" data-type="weibo" data-val="<{if $user_info['wb_nickname']}>1<{else}>0<{/if}>" data-ref="<{eval url('account/weibo_login')}>"><{if $user_info['wb_nickname']}>解绑<{else}>未绑定<{/if}></button>
				<p>微博<span class="ml20 col-grey999 font12"><{$user_info['wb_nickname']}></p>
			</li>
		</ul>
	</div>
<script type="text/javascript">
    $(function(){
        $("._bind").on("click",function(){
            var _self = $(this),_type = _self.attr("data-type"),_val = _self.attr("data-val");
            _val = 1-_val;
            if(_val == 1){
                window.location.href = _self.attr("data-ref");
            }else{
                if(!_is_login()){return;};
                layer.open({type:2});
                doRequest("/ajax/cancel_bind_login",{bindType:_type},true,function(data){
                    layer.closeAll();
                    _self.attr("data-val",_val);
                    _self.removeClass("bj-greyccc").addClass("bj-red").text("未绑定");
                    _self.siblings("p").find("span").text("");
                    $.mvalidateTip("已解除绑定");
                },function(data){$.mvalidateTip(data.errorMsg);layer.closeAll();});
            }
        });
    });
</script>
<{include file="public/footer.html"}> 